home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
PowerPlant
/
AGA Classes 1.2
/
Sliders
/
LAGASliderBase.h
< prev
next >
Wrap
Text File
|
1996-06-30
|
4KB
|
111 lines
// ===========================================================================
// LAGASliderBase.h
// ===========================================================================
// “Apple Grayscale Appearance” compliant slider abstract base class
// Copyright © 1996 Chrisoft (Christophe ANDRES) All rights reserved.
//
// You may use this source code in any application (commercial, shareware, freeware,
// postcardware, etc), but not remove this notice (no need to acknowledge the use of
// this class in the about box)
// You may not sell this source code in any form. This source code may be placed on
// publicly accessable archive sites and source code disks. It may not be placed on
// profit archive sites and source code disks without the permission of the author,
// Christophe ANDRES.
//
// This source code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// If you make any change or improvement on this class, please send the improved/changed
// version to : chrisoft@calva.net or Christophe ANDRES
// 20, rue Prosper Mérimée
// 67100 STRASBOURG
// FRANCE
//
// ===========================================================================
// LAGASliderBase.cp <- double-click + Command-D to see class implementation
//
// LAGASliderBase is an abstract class used by all the AGA slider classes to perform common duties
//
// This class requires AGAColors.cp to be present in your project
//
// Version : 1.2
//
// Change History (most recent first, date in US form : mm/dd/yy):
//
// 06/30/96 ca Public release of version 1.2
// 06/04/96 ca Added guard macros in header files
// Increased version to 1.2
// 05/16/96 ca class made available by Christophe ANDRES <chrisoft@calva.net>
// (version 1.1)
//
// To Do:
//
#ifndef _H_LAGASliderBase
#define _H_LAGASliderBase
#pragma once
#include <LControl.h>
#include <UGWorld.h>
class LAGASliderBase : public LControl
{
public :
LAGASliderBase ();
LAGASliderBase (LStream *inStream);
LAGASliderBase (const LAGASliderBase &inOriginal);
LAGASliderBase (const SPaneInfo &inPaneInfo, MessageT inValueMessage, Boolean inVertical, Boolean inBottomRightPointer,
Int32 inInitialValue, Int32 inMinValue, Int32 inMaxValue);
virtual ~LAGASliderBase ();
protected :
virtual void DrawSelf ();
virtual void DrawSlideTrack ();
virtual void DrawLabels () { };
virtual void DrawIndicator (Boolean inPushed) = 0; // Must be overriden
virtual short GetIndicatorPosition () = 0; // Must be overriden
virtual Boolean TrackHotSpot (Int16 inHotSpot, Point inPoint);
virtual void FinishTrackHotSpot (Point inPoint) { };
virtual void HotSpotAction (Int16 inHotSpot, Boolean inCurrInside, Boolean inPrevInside);
virtual void HotSpotResult (Int16 inHotSpot);
virtual void GetIndicatorRect (Rect &outRect) = 0; // Must be overriden
virtual void InitializeGhost ();
virtual void FinishGhost ();
virtual void DrawGhost (Point inPoint) = 0; // Must be overriden
virtual void DisableSelf () { Refresh(); };
virtual void EnableSelf () { Refresh(); };
Boolean mVerticalSlider;
Boolean mRightBottomPointing;
// GWorld and mask used to hold and draw the ghost pointer
LGWorld *mGhostPointer;
RgnHandle mGhostMask;
Rect mLastGhost;
Point mLastPosition;
short mTrackOriginTinkering;
};
#endif